package com.xbongbong.pro.constant;

import lombok.Getter;
import lombok.Setter;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @author jiping.yang
 * @Title: 名片扫描
 * @date 2021/5/20 14:52
 */
@Getter
@Setter
@Component
public class BaseConfig {
    @Resource
    private Environment environment;

    @Getter
    private static  String key;
    @Getter
    private static  String secret;
    @Getter
    private static  String url;
    @PostConstruct
    public  void readConfig(){
        key=environment.getProperty("com.xbongbong.ccCard.key");
        secret=environment.getProperty("com.xbongbong.ccCard.secret");
        url=environment.getProperty("com.xbongbong.ccCard.url");
    }
}
